<template>
  <el-container class="layout">
    <el-header class="header">
      <h2>智能体协同平台</h2>
    </el-header>
    <el-container>
      <el-aside width="200px" class="sidebar">
        <el-menu :default-active="activeMenu" router>
          <el-menu-item index="/monitor">
            <el-icon><Monitor /></el-icon>
            <span>监控大屏</span>
          </el-menu-item>
          <el-menu-item index="/agent">
            <el-icon><Avatar /></el-icon>
            <span>智能体管理</span>
          </el-menu-item>
          <el-menu-item index="/task">
            <el-icon><List /></el-icon>
            <span>任务管理</span>
          </el-menu-item>
        </el-menu>
      </el-aside>
      <el-main class="main">
        <router-view />
      </el-main>
    </el-container>
  </el-container>
</template>

<script setup>
import { ref } from 'vue'
import { useRoute } from 'vue-router'

const route = useRoute()
const activeMenu = ref(route.path)
</script>

<style scoped>
.layout {
  height: 100vh;
}

.header {
  background: #409eff;
  color: white;
  display: flex;
  align-items: center;
}

.sidebar {
  background: #f5f5f5;
}

.main {
  background: #fff;
}
</style>
